﻿namespace leastSquaresMethod
{
    internal class Program
    {
        static void Main(string[] args)
        {
            long[,] GDP = new long[30,3];
            for (int i = 0; i < GDP.GetLength(0); i++)
            {
                GDP[i, 1] = i+1991;
            }
            //设置一个二维数组，表示年份和GDP
            GDP[0, 2] = 383373312000;//从1991年开始计入
            GDP[1, 2] = 426915725312;
            GDP[2, 2] = 444731293696;
            GDP[3, 2] = 564324663296;
            GDP[4, 2] = 734547898224;
            GDP[5, 2] = 863746717507;
            GDP[6, 2] = 961603952954;
            GDP[7, 2] = 1029043097558;
            GDP[8, 2] = 1093997267277;
            GDP[9, 2] = 1211346869600;
            GDP[10, 2] = 1339395718862;
            GDP[11, 2] = 1470550015077;
            GDP[12, 2] = 1660287965663;
            GDP[13, 2] = 1955347004965;
            GDP[14, 2] = 2285965892364;
            GDP[15, 2] = 2752131773358;
            GDP[16, 2] = 3550342737009;
            GDP[17, 2] = 4594307032667;
            GDP[18, 2] = 5101703073088;
            GDP[19, 2] = 6087163874510;
            GDP[20, 2] = 7551500124197;
            GDP[21, 2] = 8532229986993;
            GDP[22, 2] = 9570406235659;
            GDP[23, 2] = 10475682920597;
            GDP[24, 2] = 11061553079871;
            GDP[25, 2] = 11233276536744;
            GDP[26, 2] = 12310409370894;
            GDP[27, 2] = 13894817549380;
            GDP[28, 2] = 14279937500608;
            GDP[29, 2] = 14687673892882;//到2020年结束
            //初始条件
            int theYear = 9999;
            while (theYear>1990)
            {
                Console.Write("请输入你想查询的年份:");
                theYear =Convert.ToInt32(Console.ReadLine());
                Function.main(GDP, theYear);
            }
        }
    }
}